package com.jucai.pppeiyouclient.view.dialog;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.jucai.pppeiyouclient.R;
import com.jucai.pppeiyouclient.base.BaseDialog;
import com.jucai.pppeiyouclient.comm.CommonMethod;

/**
 * Created by Kuky on 2017-04-22.
 */

public class InitiateDialog extends BaseDialog {
    private View dialogView;

    public InitiateDialog(Context context) {
        super(context);
    }

    public InitiateDialog(Context context, int themeResId) {
        super(context, themeResId);
    }

    protected InitiateDialog(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    @Override
    protected View initView() {
        dialogView = CommonMethod.getView(context, R.layout.dialog_initiate);

        ((TextView) dialogView.findViewById(R.id.alert_content)).setText(
                "活动发布成功后\n" + "不能进行编辑操作\n" + "确认是否发布您的活动");
        return dialogView;
    }

    @Override
    public void setOnclickListener(View.OnClickListener listener) {
        dialogView.findViewById(R.id.dialog_cancel).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
            }
        });

        dialogView.findViewById(R.id.dialog_initiate).setOnClickListener(listener);
    }
}
